//
//  HYVideoViewModel.h
//  XPlayer
//
//  Created by liguoqing on 2023/10/2.
//

#import "BaseViewModel.h"
#import <HYVideoPlayer/HYVideoPlayerConfig.h>

NS_ASSUME_NONNULL_BEGIN

@interface HYVideoViewModel : BaseViewModel

- (instancetype)initWithFolderIdentification:(NSString *)folderIdentification
                                   isPrivate:(BOOL)isPrivate
                                 videoConfig:(HYVideoPlayerConfig *)videoConfig;

@property (nonatomic, strong) HYVideoPlayerConfig *videoConfig;
/// 文件所在文件夹路径
@property (nonatomic, strong) NSString *folderPath;

@property (nonatomic, strong) RACSubject *playSubject;
/// 文件是否收藏过
@property (nonatomic, assign) BOOL isCollect;
/// 文件是否下载过
@property (nonatomic, assign) BOOL isDownload;

///  准备播放
- (void)readyToPlay;
/// 播放上一个
- (BOOL)playLast;
/// 播放下一个
- (BOOL)playNext;
/// 切换播放
- (void)changePlayMode;
/// 目录切换指定的位置
- (void)changePlayIndex:(NSInteger)playIndex;
/// 保存播放记忆点
- (void)saveCurrentVideoPlayTime:(NSInteger)playTime isPlayDone:(BOOL)isPlayDone;
/// 获取播放记忆点
- (CGFloat)currentVideoHistory;
/// 开始下载
- (void)startDownloadBlock:(HYBStringBlock)downloadBlock;
/// 收藏视频
- (void)collectVideo;

@end

NS_ASSUME_NONNULL_END
